<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 任宝顺
  Date: 2022/2/23
  Time: 20:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
  <meta charset="utf-8" />
  <title>手机管理系统</title>
  <link rel="stylesheet"type="text/css" href="css/file.css"/>
</head>
<body>
<div class="navbar">
  <div class="container">
    <a class="logo" href="#">手机管理系统</a>
    <nav class="userbar">
      <ul class="cl">
        <li class="lfet">欢迎:</li>
        <li class="lfet">${sessionScope.user.username}登录</li>
        <li class="lfet"><a href="${pageContext.request.contextPath}/removeBrandController" style="color: #fff;">退出</a></li>
      </ul>
    </nav>
  </div>
</div>
<div class="article">
  <div class="bor">
    <div class="bg">
					<span class="lfet">
						<a href="${pageContext.request.contextPath}/addBrand.jsp" class="btn btn-primary radius">添加品牌</a>
						<a href="${pageContext.request.contextPath}/FindAllPhoneController" class="btn btn-primary radius">手机管理</a>
					</span>
    </div>
    <div>
      <form action="">
        <table class="table table-border table-bordered table-hover table-bg table-sort">
          <thead>
          <tr class="text-c">
            <th width="80">ID</th>
            <th width="80">品牌名称</th>
            <th width="80">该品牌下手机数量</th>
            <th width="130">操作</th>
          </tr>
          </thead>
          <tbody>
          <c:forEach items="${brandList}" var="brand">
          <tr class="text-c">
            <td>${brand.id}</td>
            <td>${brand.name}</td>
            <td>${brand.phoneNum}</td>
            <td class="td-manage">
              <a style="text-decoration:none" href="${pageContext.request.contextPath}/deleteBrandByIdController?id=${brand.id}">删除</a>
            </td>
          </tr>
          </c:forEach>
<%--          <tr class="text-c">--%>
<%--            <td>2</td>--%>
<%--            <td>苹果</td>--%>
<%--            <td>4</td>--%>
<%--            <td class="td-manage">--%>
<%--              <a style="text-decoration:none" href="">删除</a>--%>
<%--            </td>--%>
<%--          </tr>--%>
          </tbody>
        </table>
      </form>
    </div>
  </div>
</div>
</body>
</html>
